package recursion.leetcode.easy;

/**
 * @author bruin_du
 * @description 斐波那契数列
 * @date 2022/5/24 15:15
 **/
public class Offer10I_Fibonacci {
    public int fib(int n) {
        int a = 0,b = 1,c = 1;
        while(n > 0){
            c = (a + b) % 1000000007;
            a = b;
            b = c;
            n--;
        }
        return a;
    }
}
